<script setup lang="ts">
import router from "@/router";
import {useRoute} from "vue-router";

const route = useRoute();

const changePageInfo = (path: string) => {
  router.push({
    path: path,
    query: {
      hoscode: route.query.hoscode
    }
  })
}
</script>

<template>
  <div class="nav">
    <el-menu :default-active="$route.path">
      <el-menu-item index="/hospital/register" @click="changePageInfo('/hospital/register')">
        <el-icon>
          <Menu/>
        </el-icon>
        <span>预约挂号</span>
      </el-menu-item>
      <el-menu-item index="/hospital/detail" @click="changePageInfo('/hospital/detail')">
        <el-icon>
          <Document/>
        </el-icon>
        <span>医院详情</span>
      </el-menu-item>
      <el-menu-item index="/hospital/notice" @click="changePageInfo('/hospital/notice')">
        <el-icon>
          <setting/>
        </el-icon>
        <span>预约通知</span>
      </el-menu-item>
      <el-menu-item index="/hospital/suspend" @click="changePageInfo('/hospital/suspend')">
        <svg t="1712732583211" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
             p-id="8088" width="16" height="16">
          <path
              d="M422.7 425.8l-35.8 1.4 5.4 22.8h-64v26.5h164.4V450h-64.9l-5.1-24.2z m148.2 1.4L545 447.1c10.5 12.8 29.3 41 37 54.6l25.9-23.9c-9.1-13.9-26.5-37.8-37-50.6z m-125.2 82v10.2h-76.2v-10.2h76.2z m33-23.1H336.8v56.3h141.9v-56.3z m222.7-62.8h-26.2c-14.8 28.2-46.9 64.9-83.9 88.2l18.8 31c35.3-25 61.4-52.1 78.5-76.8 15.9 26.2 45.8 54 81.4 77.9l19.1-32.4c-38.7-22.8-72.6-54.1-87.7-87.9z m-2.5 70.8c-26.2 23.6-53.8 41.8-88.2 57.7l13.9 28.7c36.7-17.1 66.6-35.8 92.7-60.9l-18.4-25.5z m-198.6 58.3H317.4v50.3h30.7v-24.2h119.8V603h32.4v-50.6z m224.5-18.2c-26.2 24.2-63.4 48.1-107.8 64.9l13.7 31.3c45.8-19.1 83.3-43 112.6-72.5l-18.5-23.7z m-134.9-24.8H533v35.8h23v85.9c0 9.1-0.6 13.7-5.1 18.5l22.5 25.9c3.1-4.3 7.1-8.2 11.9-12.5 10.2-9.4 28.2-25.3 32.7-29l-11.7-34.4c-4.3 4.3-11.1 10.5-16.5 14.8v-105z m-292.4-82.2c-12.8 44.7-29.3 82.2-56 121.7l24.5 23.6c4.8-6 8.8-11.4 12.5-16.8v125.7h30.4V499.8c8-19.3 14.5-40.1 21.6-65.4l-33-7.2z m165.6 163H352.4v29h42.1v19.9c0 8.8-1.7 10.2-11.7 11.4l-17.1 2 11.7 31.6 16.2-2c27.6-3.1 35.3-9.4 35.3-33.6v-29.3H463v-29z m289-15.6c-39.5 37.8-85 62.3-152.2 79.9l16.2 35.3c66.8-20.5 118-49.2 158.7-88.2l-22.7-27z m-10-347c63.4 0 86.4 6.6 109.6 19 23.2 12.4 41.4 30.6 53.8 53.8 12.4 23.2 19 46.2 19 109.6v289.6c0 63.4-6.6 86.4-19 109.6-12.4 23.2-30.6 41.4-53.8 53.8-23.2 12.4-46.2 19-109.6 19H281.9c-63.4 0-86.4-6.6-109.6-19-23.2-12.4-41.4-30.6-53.8-53.8-12.4-23.2-19-46.2-19-109.6V409.9c0-63.4 6.6-86.4 19-109.6 12.4-23.2 30.6-41.4 53.8-53.8 23.2-12.4 46.2-19 109.6-19h460.2z"
              fill="#1B79FA" p-id="8089"></path>
          <path
              d="M298.7 113.8c31.4 0 56.9 25.5 56.9 56.9V256H241.8v-85.3c0-31.5 25.4-56.9 56.9-56.9z m426.6 0c31.4 0 56.9 25.5 56.9 56.9V256H668.4v-85.3c0-31.5 25.5-56.9 56.9-56.9z"
              fill="#1B79FA" p-id="8090"></path>
        </svg>
        <span>停诊信息</span>
      </el-menu-item>
      <el-menu-item index="/hospital/search" @click="changePageInfo('/hospital/search')">
        <el-icon>
          <Search/>
        </el-icon>
        <span>查询/取消</span>
      </el-menu-item>
    </el-menu>
  </div>
</template>

<style scoped lang="less">
.icon {
  margin-right: 10px;
}
</style>
